<section id="homepage" class="focus_layout">
<div class="content-wrap">
<script type="text/javascript">
function next_news(){
if($('.news_visible').next('.single_news_container').length){
$('.news_visible').fadeOut(100, function(){
$('.news_visible').removeClass('news_visible').next('.single_news_container').addClass('news_visible').fadeIn(100);
var current = parseInt($('#current_news_num').text());
$('#current_news_num').text(current + 1);
});
}
}
</script> 
    <div class="hotnews">
        <p class="controller">
            <a href="#rewind" class="rewind">Trước</a>
            <a href="#forward" class="forward">Sau</a>
        </p>
        <label>Tin mới</label>
        <ul>
        </ul>
        <div id='news_navigation'></div>

        <time datetime="" pubdate>Cập nhật </time>

    </div>


    <section class="featured">
        <?php foreach ($top16post as $data) {
            if( $data->topic_news_number ==  1):
        ?>
                <article class="featured <?php
                                    if ($data->topic_news_type == "video") {
                                        echo "hasvideo";
                                    } elseif ($data->topic_news_type == "picture") {
                                        echo "picture";
                                    } else {
                                        echo "default";
                                    }
                                    ?>">
                        <p class="type">Ảnh</p>
                        <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture; ?>);">
                            <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
                        </div>
                        <header>
                            <h1>
                                <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>">
                                    <?php echo $data->topic_news_title; ?>
                                </a>
                                <span class="social hot" style="display: inline;">HOT</span>
                            </h1>
                            <time datetime="<?php echo $data->topic_news_date; ?>"></time>
                            <p class="cate">
                                <?php
                                    $CI = & get_instance();
                                    $CI->load->model('category_model','cate');
                                    $category = $CI->cate->getInfo($data->category_id);
                                    if ($category) echo $category->category_name;
                                ?>

                            </p>
                            <p class="summary"><?php echo substr(strip_tags($data->topic_news_content), 0,255) ?></p>
                        </header>
                    <?php endif;    }  ?>
                <ul class="relate">
                    <?php foreach ($top16post as $data) {
                                if ($data->topic_news_number == "2" || $data->topic_news_number == "3"): ?>
                                        <li class="<?php
                                                        if ($data->topic_news_type == "video") {
                                                            echo "hasvideo";
                                                        } elseif ($data->topic_news_type == "picture") {
                                                            echo "picture";
                                                        } else {
                                                            echo "default";
                                                        }
                                                        ?>">
                                            <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"><?php echo $data->topic_news_title; ?></a>
                                        </li>
                                 <?php endif;
                            }
                    ?>
                </ul>
            </article>
           <?php foreach ($top16post as $data) {
                    if($data->topic_news_number == "5" || $data->topic_news_number == "6" || $data->topic_news_number == "7"): ?>
                        <article class="<?php
                                            if ($data->topic_news_type == "video") {
                                                echo "hasvideo";
                                            } elseif ($data->topic_news_type == "picture") {
                                                echo "picture";
                                            } else {
                                                echo "default";
                                            }
                                            ?>">
                                <p class="type">Ảnh</p>
                                <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture; ?>)">
                                        <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
                                </div>
                                <header>
                                    <h1>
                                        <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"><?php echo $data->topic_news_title; ?></a>
                                        <span class="social hot" style="display: inline;">HOT</span>
                                    </h1>
                                    <time datetime="<?php echo $data->topic_news_date; ?>"></time>
                                    <p class="cate">
                                        <?php
                                            $CI = & get_instance();
                                            $CI->load->model('category_model','cate');
                                            $category = $CI->cate->getInfo($data->category_id);
                                            if ($category) echo $category->category_name;
                                        ?>
                                    </p>
                                </header>
                        </article>
                       <?php 
                    endif;
           }
        ?>
    </section>


    <!--
    TRENDING NEWS (NOI BAT 2)
    + 12 articles from Noi Bat 2 box, as ordered in CMS
    + note: keep cate/time/cover/type information (CSS will hide them as needed by the layout)
    -->
    <section class="trending scroll">

            <div class="top-list">
                    <?php  foreach ($top16post as $data) {
                                if($data->topic_news_number == "8"):
                    ?>
                                    <article class="<?php
                                                        if ($data->topic_news_type == "video") {
                                                            echo "hasvideo";
                                                        } elseif ($data->topic_news_type == "picture") {
                                                            echo "picture";
                                                        } else {
                                                            echo "default";
                                                        }
                                                        ?>">
                                        <p class="type"></p>
                                        <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture; ?>)">
                                                <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
                                        </div>
                                        <header>
                                            <h1>
                                                <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>">
                                                <?php echo $data->topic_news_title; ?>
                                                </a>

                                            </h1>
                                            <time datetime="<?=date('H:i:s d-m-Y', $data->topic_news_date)?>"><?=date('H:i:s d-m-Y', $data->topic_news_date)?></time>
                                            <p class="cate">
                                                <?php
                                                    $CI = & get_instance();
                                                    $CI->load->model('category_model','cate');
                                                    $category = $CI->cate->getInfo($data->category_id);
                                                    if ($category) echo $category->category_name;
                                                ?>
                                            </p>
                                        </header>
                                    </article>
                        <?php   endif;
                        } ?>
            </div>
            <?php   foreach ($top16post as $data) {
                        if($data->topic_news_number  <  20):
            ?>
                            <article class="<?php
                                                if ($data->topic_news_type == "video") {
                                                    echo "hasvideo";
                                                } elseif ($data->topic_news_type == "picture") {
                                                    echo "picture";
                                                } else {
                                                    echo "default";
                                                }
                                                ?>">
                                <p class="type"></p>
                                <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture; ?>)">
                                    <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
                                </div>
                                <header>
                                    <h1>
                                        <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"><?php echo $data->topic_news_title; ?></a>
                                    </h1>
                                    <time datetime="<?=date('H:i:s d-m-Y', $data->topic_news_date)?>"><?=date('H:i:s d-m-Y', $data->topic_news_date)?></time>
                                    <p class="cate">
                                        <?php
                                            $CI = & get_instance();
                                            $CI->load->model('category_model','cate');
                                            $category = $CI->cate->getInfo($data->category_id);
                                            if ($category) echo $category->category_name;
                                        ?>
                                    </p>
                                </header>
                            </article>
                <?php
                endif;
                } ?>


            <!-- js randomly select one article to display-->
            <script>
                var elements = $('.top-list article').length;
                $($('.top-list article')[Math.floor(Math.random() * elements)]).show();
            </script>
    </section>
</div>
<section class="sidebar">
    <div id="advR1" class="banner"></div>
    <div id="advR2" class="banner"></div>
    <div class="contact">
        <ul>
            <li class="email">
                <span>Email</span>
                <a href="mailto:tiepnd@htsvietnam.vn" title="Gửi email">tiepnd@htsvietnam.vn</a>
                | <a href="javascript:showBoxAds();" title="Liên hệ quảng cáo">Liên hệ Quảng cáo</a>
            </li>
            <li class="phone">
                <span>Đường dây nóng</span>
                <a href="javascript:showPhoneBox();" title="Điện thoại nóng">(HN) 0985.57.88.55</a> |
                <a href="javascript:showPhoneBox();" title="Điện thoại nóng">(HCM) 0909.18.66.66</a>
            </li>
        </ul>
    </div>
</section>

<section id="multimedia">
    <header>
        <h1>Ảnh và video</h1>
    </header>
    <?php foreach ($top5media as $data) {
          ?>
        <article class="<?php
                            if ($data->topic_news_type == "video") {
                                echo "hasvideo";
                            } elseif ($data->topic_news_type == "picture") {
                                echo "picture";
                            } else {
                                echo "default";
                            }
                            ?>">
            <p class="type"></p>
            <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture; ?>);">
                <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
            </div>
            <header>
                <h1>
                    <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>">
                    <?php echo $data->topic_news_title; ?>
                    </a>

                </h1>
                <time datetime="<?=date('H:i:s d-m-Y', $data->topic_news_date)?>"></time>
                <p class="cate">
                    <?php
                        $CI = & get_instance();
                                    $CI->load->model('category_model','cate');
                        $category = $CI->cate->getInfo($data->category_id);
                        if ($category) echo $category->category_name;
                    ?>
                </p>
            </header>
    </article>
    <?php 
    } 
    ?>
</section>

<div class="content-wrap">
    <?php foreach ($menu as $value) {
    ?>
<section id="<?php echo $value->class; ?>" class="category skin1">
    <header>
        <hgroup>
            <h1><a href="<?=site_url('home/category').'/'.$value->category_id?>" title="<?php echo $value->category_name; ?>"><?php echo $value->category_name; ?></a></h1>
            <?php foreach ($submenu as $valuesub) {
                     if($valuesub->category_id == $value->category_id): 
            ?>
                <h2><a href='<?=site_url('home/sub_cate').'/'.$valuesub->sub_category_id?>'><?php echo $valuesub->sub_category_name; ?></a></h2>
                <?php
                    endif;
                } ?>
        </hgroup>
    </header>
    <?php 
        $CI = & get_instance();
        $CI->load->model('mindex');
        $topic_by_cate = $CI->mindex->getTopicByCate($value->category_id);
            if ($topic_by_cate):
                ?>
                <article class="featured ">
                    <p class="type"></p>
                    <header>
                        <h1>
                            <a href="<?=site_url('home/detail').'/'.$topic_by_cate[0]->topic_news_id?>">
                            <?php echo $topic_by_cate[0]->topic_news_title; ?>
                            </a>
                            <span class="social hot" style="display: inline;"><?=$topic_by_cate[0]->top?></span>
                        </h1>
                        <time datetime="<?=date('H:i:s d-m-Y', $topic_by_cate[0]->topic_news_date)?>"></time>
                    </header>
                    <div class="cover" style="background-image: url(<?=base_url().$topic_by_cate[0]->topic_news_picture; ?>)">
                        <a href=""></a>
                    </div>
                    <p class="summary"><?php echo substr(strip_tags($topic_by_cate[0]->topic_news_content) ,0,255); ?></p>
                    <!-- <ul class="relate">
                        <?php
                        for($i=0;$i<count($topic);$i++){
                             if($topic[$i]['category_id'] == $value->category_id):  
                                //echo $topic[$i]['topic_news_id']."=";
                                continue;
                        ?> 
                        <li class="">
                            <a href="<?=site_url('home/detail').'/'.$topic[$i]['topic_news_id']?>">
                            <?php echo $topic[$i]['topic_news_title'] ; ?></a>
                        </li>
                        <?php endif; 
                        }  ?>
                    </ul> -->
                </article>

        <div class="top">
            <?php 
                for($j=1;$j<5;$j++){
                    if(count($topic_by_cate)<$j+1){
                        break;
                    }
            ?>
            <article class="<?php
                            if ($topic_by_cate[$j]->topic_news_type == "video") {
                                echo "hasvideo";
                            } elseif ($topic_by_cate[$j]->topic_news_type == "picture") {
                                echo "picture";
                            } else {
                                echo "default";
                            }
                            ?>">
                <div class="cover" style="background-image: url(<?=base_url().$topic_by_cate[$j]->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$topic_by_cate[$i]->topic_news_id?>"></a>
                </div>
                <header>
                    <h1>
                        <a href="<?=site_url('home/detail').'/'.$topic_by_cate[$j]->topic_news_id?>">
                        <?=$topic_by_cate[$j]->topic_news_title?>
                        </a>

                    </h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $topic_by_cate[$j]->topic_news_date)?>"></time>
                </header>
            </article>
            <?php }?>
        </div>
        <?php if(count($topic_by_cate) >5):?>
        <article class="aside ">
            <p class="type"></p>
            <div class="cover" style="background-image: url(<?=base_url().$topic_by_cate[5]->topic_news_picture?>)">
                <a href="<?=site_url('home/detail').'/'.$topic_by_cate[5]->topic_news_id?>"></a>
            </div>
            <header>
                <h1>
                    <a href="<?=site_url('home/detail').'/'.$topic_by_cate[5]->topic_news_id?>">
                        <?=$topic_by_cate[5]->topic_news_title?>
                    </a>
                    <span class="social <?=$topic_by_cate[5]->top?>" style="display: inline;"><?=$topic_by_cate[5]->top?></span>
                </h1>
                <time datetime="<?=date('H:i:s d-m-Y', $topic_by_cate[5]->topic_news_date)?>"></time>
            </header>
        </article>
        <?php
            endif;
            endif;
        ?>
</section>
<?php
}
?>
</div>
<section class="sidebar">

    <!-- End 123.vn -->


    <section class="pictures">
        <header>
            <h1><a href="/tieu-diem/gallery.html" title="Tin ảnh">Tin ảnh</a></h1>
        </header>
        <div class="slidebox">
        <?php 
            if($top5picture):
            foreach ($top5picture as $data) {
        ?>
            <article class="current">
                <div class="cover" style="background-image: url(<?=base_url().$data->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"></a>
                </div>
                <header>
                    <h1>
                        <a href="<?=site_url('home/detail').'/'.$data->topic_news_id?>"><?=$data->topic_news_title?></a>
                        <span class="social hot" style="display: inline;"><?=$data->top?></span>
                    </h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $data->topic_news_date)?>"></time>
                </header>
            </article>
            <?php } endif;?>
        </div>
        <p class="controller">
            <a href="#rewind" class="rewind" style="display: none;">Bài trước</a>
            <a href="#forward" class="forward" style="display: none;">Bài sau</a>
        </p>
    </section>

    <!-- Start Box Sidebar -->

    <section class="video">
            <header>
                <h1><a>Video</a></h1>
            </header>
            <?php 
                if($top3video):
            ?>
            <article class="featured video">
                <p class="type">video</p>
                <div class="cover" style="background-image: url(<?=base_url().$top3video[0]->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$top3video[0]->topic_news_id?>"></a>
                </div>
                <header>
                    <h1><a href="/<?=site_url('home/detail').'/'.$top3video[0]->topic_news_id?>">
                    <?=$top3video[0]->topic_news_title?>
                    </a></h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $top3video[0]->topic_news_date)?>"></time>
                </header>
            </article>
            <article class="video">
                <p class="type">video</p>
                <div class="cover" style="background-image: url(<?=base_url().$top3video[1]->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$top3video[1]->topic_news_id?>"></a>
                </div>
                <header>
                    <h1><a href="<?=site_url('home/detail').'/'.$top3video[1]->topic_news_id?>">
                    <?=$top3video[1]->topic_news_title?>
                    </a></h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $top3video[1]->topic_news_date)?>"></time>
                </header>
            </article>
            <article class="video">
                <p class="type">video</p>
                <div class="cover" style="background-image: url(<?=base_url().$top3video[2]->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$top3video[2]->topic_news_id?>"></a>
                </div>
                <header>
                    <h1><a href="<?=site_url('home/detail').'/'.$top3video[2]->topic_news_id?>">
                    <?=$top3video[2]->topic_news_title?>
                    </a></h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $top3video[2]->topic_news_date)?>"></time>
                </header>
            </article>
            <?php endif;?>
    </section>

    <section class="order-list">
            <header>
                <h1><a title="Đọc nhiều nhất">Đọc nhiều nhất</a></h1>
            </header>
            <?php 
                if($topicReadless):
                    foreach ($topicReadless as $key => $value) {
            ?>
            <article>
                <span class="order"><?=$key+1?></span>
                <div class="cover" style="background-image: url(<?=base_url().$value->topic_news_picture?>)">
                    <a href="<?=site_url('home/detail').'/'.$value->topic_news_id?>"></a>
                </div>
                <header>
                    <h1>
                        <a href="<?=site_url('home/detail').'/'.$value->topic_news_id?>">
                        <?=$value->topic_news_title?>
                        </a>
                        <span class="social hot" style="display: inline;"><?=$value->top?></span>
                    </h1>
                    <time datetime="<?=date('H:i:s d-m-Y', $value->topic_news_date)?>"></time>
                    <p class="cate">
                         <?php
                            $CI = & get_instance();
                                    $CI->load->model('category_model','cate');
                            $category = $CI->cate->getInfo($value->category_id);
                            if ($category) echo $category->category_name;
                        ?>
                    </p>
                </header>
            </article>
            <?php } endif;?>
    </section>


    <!-- laban in homepage -->
    <iframe src="http://laban.vn/api/html/football/football-table?utm_source=znews&amp;u…" style="width: 100%; height: 415px; overflow: hidden;"></iframe>

    <section class="topic ">
            <header>

                <h1><a href="/tieu-diem/xa-hoi-24-gio-qua1680.html" title="XÃ HỘI 24 GIỜ QUA">XÃ HỘI 24 GIỜ QUA</a></h1>
            </header>

            <article class='featured'>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/mtfuc/2014_02_18/44.JPG)">
                    <a href="/Truy-tim-chu-nhan-chiec-binh-o-xy-phat-no-tren-xe-khach-post392735.html"></a>
                </div>
                <header>
                    <h1>
                        <a href="/Truy-tim-chu-nhan-chiec-binh-o-xy-phat-no-tren-xe-khach-post392735.html">
                        Truy tìm chủ nhân chiếc bình ô xy phát nổ trên xe khách
                        </a>

                    </h1>
                    <time datetime="2014-02-18 14:30+0700"></time>
                </header>
            </article>


            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/xpcwvovb/2014_02_18/toa_nha9.jpg)">
                    <a href="/Ngay-lam-viec-dau-tien-o-thanh-pho-moi-Binh-Duong-post392711.html"></a>
                </div>
                <header>
                    <h1>
                        <a href="/Ngay-lam-viec-dau-tien-o-thanh-pho-moi-Binh-Duong-post392711.html">
                            Ngày làm việc đầu tiên ở thành phố mới Bình Dương 
                        </a>
                        <span class="social hot" style="display: inline;">HOT</span>
                    </h1>
                    <time datetime="2014-02-18 13:05+0700"></time>
                </header>
            </article>
            <p class="btnMore"><a href="/tieu-diem/xa-hoi-24-gio-qua1680.html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>



    <section class="topic ">
            <header>

                <h1><a href="/tieu-diem/U19-Viet-Nam .html" title="U19 Việt Nam">U19 Việt Nam</a></h1>
            </header>

            <article class='featured'>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/zatmrs/2014_02_18/8_.JPG)">
                    <a href="/U19-Viet-Nam-nham-nhi-tra-nong-keo-lac-via-he-post392697.html"></a>
                </div>
                <header>
                    <h1>
                        <a href="/U19-Viet-Nam-nham-nhi-tra-nong-keo-lac-via-he-post392697.html">
                        U19 Việt Nam nhâm nhi trà nóng, kẹo lạc vỉa hè
                        </a>
                        <span class="social hot" style="display: inline;">HOT</span>
                    </h1>
                    <time datetime="2014-02-18 16:18+0700"></time>
                </header>
            </article>


            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/zatmrs/2014_02_17/1558975_449610715161999_1230269502_o.jpg)">
                    <a href="/U19-VN-tu-tin-phong-van-bang-tieng-Anh-Phap-khi-xin-visa-post392502.html"></a>
                </div>
                <header>
                    <h1>
                    <a href="/U19-VN-tu-tin-phong-van-bang-tieng-Anh-Phap-khi-xin-visa-post392502.html">
                    U19 VN tự tin phỏng vấn bằng tiếng Anh, Pháp khi xin visa
                    </a>
                    <span class="social hot" style="display: inline;">HOT</span>
                    </h1>
                    <time datetime="2014-02-17 17:18+0700"></time>
                </header>
            </article>
            <p class="btnMore"><a href="/tieu-diem/U19-Viet-Nam .html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>
    <section class="topic ">
        <header>

            <h1><a href="/tieu-diem/diem-nong-showbiz.html" title="Điểm nóng showbiz">Điểm nóng showbiz</a></h1>
        </header>

        <article class='featured'>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/Nphunow/2014_02_18/tuan3.png)">
                <a href="/Bui-Anh-Tuan-Toi-khong-xung-dang-la-hoang-tu-post392807.html"></a>
            </div>
            <header>
                <h1>
                    <a href="/Bui-Anh-Tuan-Toi-khong-xung-dang-la-hoang-tu-post392807.html">
                    Bùi Anh Tuấn: 'Tôi không xứng đáng là hoàng tử'
                    </a>
                    <span class="social hot" style="display: inline;">HOT</span>
                </h1>
                <time datetime="2014-02-18 18:31+0700"></time>
            </header>
        </article>


        <article>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/tmuizd/2014_02_18/lehieu_thumb.jpg)">
                <a href="/Van-Mai-Huong-Su-that-dang-sau-cuoc-chia-tay-voi-Le-Hieu-post392716.html"></a>
            </div>
            <header>
                <h1>
                    <a href="/Van-Mai-Huong-Su-that-dang-sau-cuoc-chia-tay-voi-Le-Hieu-post392716.html">
                    Văn Mai Hương: Sự thật đằng sau cuộc chia tay với Lê Hiếu
                    </a>

                </h1>
                <time datetime="2014-02-18 12:21+0700"></time>
            </header>
        </article>

        <p class="btnMore"><a href="/tieu-diem/diem-nong-showbiz.html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>



    <section class="topic ">
        <header>

            <h1><a href="/tieu-diem/nhung-nguoi-tre-cam-tinh-con-ngua.html" title="Những người trẻ cầm tinh con ngựa">Những người trẻ cầm tinh con ngựa</a></h1>
        </header>

        <article class='featured'>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/Ycgmvlbp/2014_01_26/luk.jpg)">
                <a href="/Co-gai-tuoi-ngua-cua-loat-phim-ngan-hot-nhat-nam-2013-post388043.html"></a>
            </div>
            <header>
                <h1>
                    <a href="/Co-gai-tuoi-ngua-cua-loat-phim-ngan-hot-nhat-nam-2013-post388043.html">
                    Cô gái tuổi ngựa của loạt phim ngắn hot nhất năm 2013
                    </a>
                    <span class="social hot" style="display: inline;">HOT</span>
                </h1>
                <time datetime="2014-02-06 08:01+0700"></time>
            </header>
        </article>


        <article>
            <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/rugtzn/2014_01_29/unnamed12.jpg)">
                <a href="/Dao-dien-9X-tuoi-ngua-chap-nhan-danh-doi-de-lam-phim-post388718.html"></a>
            </div>
            <header>
                <h1>
                    <a href="/Dao-dien-9X-tuoi-ngua-chap-nhan-danh-doi-de-lam-phim-post388718.html">
                    Đạo diễn 9X tuổi ngựa chấp nhận đánh đổi để làm phim
                    </a>
                    <span class="social hot" style="display: inline;">HOT</span>
                </h1>
                <time datetime="2014-02-05 07:58+0700"></time>
            </header>
        </article>
        <p class="btnMore"><a href="/tieu-diem/nhung-nguoi-tre-cam-tinh-con-ngua.html" title="TOPIC_TITLE">Xem thêm</a></p>
    </section>


    <section id="promotedposts">
            <header>
                <h1><a href="/thi-truong/TTDN.html" title="Thông tin doanh nghiệp">Thông tin doanh nghiệp </a></h1>
            </header>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_18/thum_182.jpg)">
                    <a href="/Nhan-sac-DJ-Ngoc-Nancy-post392741.html"></a>
                </div>
                <header>
                    <h1>
                        <a href="/Nhan-sac-DJ-Ngoc-Nancy-post392741.html">
                        Nhan sắc DJ Ngọc Nancy
                        </a>

                    </h1>
                </header>
            </article>

            <article>
                <div class="cover" style="background-image: url(http://img.v3.news.zdn.vn/w480/Uploaded/JAC1_N3/2014_02_18/image001_5.jpg)">
                    <a href="/Xu-huong-mua-smartphone-gia-re-thay-dien-thoai-pho-thong-post392786.html"></a>
                </div>
                <header>
                    <h1>
                        <a href="/Xu-huong-mua-smartphone-gia-re-thay-dien-thoai-pho-thong-post392786.html">
                        Xu hướng mua smartphone giá rẻ thay điện thoại phổ thông
                        </a>

                    </h1>
                </header>
            </article>
    </section>
    <script>
        var posts = $('#promotedposts article');
        if ($(posts).length <= 5) {
            $('#promotedposts article').show();
            $('#promotedposts').show();
        } else {
            var display = [];
            while (display.length < 5) {
                i = Math.floor(Math.random() * $(posts).length);
                if (display.indexOf(i) == -1) display.push(i);
            }
            for (var i = 0, j = display.length; i < j; i++) {
                $($(posts)[display[i]]).show();
            };
            $('#promotedposts').show();
        }
    </script>

</section>

</section>